|
| Format: AD rA, rB, rC |
| Purpose: Add two 27-bit integer registers together |
| Description: The 27-bit value in rC is added to the 27-bit value in rB, the result is placed in rA. |
| Operation: rA ← rB + rC |
| Flags affected: Z C O S |
|
| Format: ADC rA, rB, rC |
| Purpose: Add two 27-bit integer registers together including the carry bit |
| Description: The 27-bit value in rC is added to the 27-bit value in rB, the carry bit from any previous operation is added to the result. The result is placed in rA. |
| Operation: rA ← rB + rC + Carry_Bit |
| Flags affected: Z C O S |
|
|
|
|
|
26 |
| 0100000 | rA | rB | Immediate | 01 | UF |
|
| Format: ADCI rA, rB, IMM |
| Purpose: Add a 7-bit immediate value to a 27-bit integer register including the carry bit |
| Description: The 7-bit immediate value is added to the 27-bit value in rB, the carry bit from any previous operation is added to the result. The result is placed in rA. |
| Operation: rA ← rB + IMM + Carry_Bit |
| Flags affected: Z C O S |
|
|
|
|
|
26 |
| 0100010 | rA | rB | Immediate | 01 | UF |
|
| Format: ADCIM rA, rB, IMM |
| Purpose: Add a 7-bit immediate value to a 54-bit integer register including the carry bit |
| Description: The 7-bit immediate value is added to the 54-bit value in rB:rB+1, the carry bit from any previous operation is added to the result. The result is placed in rA:rA+1. |
| Operation: rA:rA+1 ← rB:rB+1 + IMM + Carry_Bit |
| Flags affected: Z C O S |
|
| Format: ADCM rA, rB, rC |
| Purpose: Add two 54-bit integer registers together including the carry bit |
| Description: The 54-bit value in rC:rC+1 is added to the 54-bit value in rB:rB+1, the carry bit from any previous operation is added to the result. The result is placed in rA:rA+1. |
| Operation: rA:rA+1 ← rB:rB+1 + rC:rC+1 + Carry_Bit |
| Flags affected: Z C O S |
|
| Format: ADF rA, rB, rC |
| Purpose: Add two 27-bit floating point registers together |
| Description: The 27-bit floating point value in rC is added to the 27-bit floating point value in rB, the result is placed in rA. |
| Operation: rA ← rB + rC |
| Flags affected: Z C O S |
|
| Format: ADFM rA, rB, rC |
| Purpose: Add two 54-bit floating point registers together |
| Description: The 54-bit floating point value in rC:rC+1 is added to the 54-bit floating point value in rB:rB+1, the result is placed in rA:rA+1. |
| Operation: rA:rA+1 ← rB:rB+1 + rC:rC+1 |
| Flags affected: Z C O S |
|
|
|
|
|
26 |
| 0000000 | rA | rB | Immediate | 01 | UF |
|
| Format: ADI rA, rB, IMM |
| Purpose: Add a 7-bit immediate value to a 27-bit integer register |
| Description: The 7-bit immediate value is added to the 27-bit value in rB, the result is placed in rA. |
| Operation: rA ← rB + IMM |
| Flags affected: Z C O S |
|
|
|
|
|
26 |
| 0000010 | rA | rB | Immediate | 01 | UF |
|
| Format: ADIM rA, rB, IMM |
| Purpose: Add a 7-bit immediate value to a 54-bit integer register |
| Description: The 7-bit immediate value is added to the 54-bit value in rB:rB+1, the result is placed in rA:rA+1. |
| Operation: rA:rA+1 ← rB:rB+1 + IMM |
| Flags affected: Z C O S |
|
| Format: ADM rA, rB, rC |
| Purpose: Add two 54-bit integer registers together |
| Description: The 54-bit value in rC:rC+1 is added to the 54-bit value in rB:rB+1, the result is placed in rA:rA+1. |
| Operation: rA:rA+1 ← rB:rB+1 + rC:rC+1 |
| Flags affected: Z C O S |
|
| Format: AN rA, rB, rC |
| Purpose: Bit-wise AND two 27-bit integer registers together |
| Description: The 27-bit value in rC is bit-wise AND to the 27-bit value in rB, the result is placed in rA. |
| Operation: rA ← rB & rC |
| Flags affected: Z C O S |
|
|
|
|
|
26 |
| 0010100 | rA | rB | Immediate | 01 | UF |
|
| Format: ANI rA, rB, IMM |
| Purpose: Bit-wise AND a 27-bit integer register and 7-bit immediate together |
| Description: The 7-bit immediate value is bit-wise AND to the 27-bit value in rB, the result is placed in rA. |
| Operation: rA ← rB & IMM |
| Flags affected: Z C O S |
|
| Format: ANM rA, rB, rC |
| Purpose: Bit-wise AND two 54-bit integer registers together |
| Description: The 54-bit value in rC:rC+1 is bit-wise AND to the 54-bit value in rB:rB+1, the result is placed in rA:rA+1. |
| Operation: rA:rA+1 ← rB:rB+1 & rC:rC+1 |
| Flags affected: Z C O S |
|
| Format: Bcc Offset |
| Purpose: Conditional branch to an offset |
Description: If the specified condition is true then the sign extended offset is added to the current program counter.
The condition table is as follows:
| cc | Value | Description | Flag State Checked |
| n | 0000 | Not Equal / Not Zero | Z == 0 |
| e | 0001 | Equal / Zero | Z == 1 |
| l | 0010 | Less Than | C == 1 AND Z == 0 |
| le | 0011 | Less Than or Equal | C == 1 OR Z == 1 |
| g | 0100 | Greater Than | C == 0 AND Z == 0 |
| ge | 0101 | Greater Than or Equal | C == 0 OR Z == 1 |
| no | 0110 | Not Overflow | O == 0 |
| o | 0111 | Overflow | O == 1 |
| ns | 1000 | Not Signed | S == 0 |
| s | 1001 | Signed | S == 1 |
| sl | 1010 | Signed Less Than | S != O |
| sle | 1011 | Signed Less Than or Equal | S != O OR Z == 1 |
| sg | 1100 | Signed Greater Than | S == O AND Z == 0 |
| sge | 1101 | Signed Greater Than or Equal | S == O |
| 1111 | Always | |
|
Operation:
if Flags == Condition then
PC += (signed)Offset |
| Flags affected: |
|
|
|
|
26 |
| 101001100 | rA | rB | 1000000 | UF |
|
| Format: BF rA, rB |
| Purpose: Bit flip a 27-bit register |
| Description: Invert all bits of the 27-bit rB register value and store the result in rA. |
| Operation: rA ← ~rB |
| Flags affected: Z C O S |
|
|
|
|
26 |
| 101001110 | rA | rB | 1000000 | UF |
|
| Format: BFM rA, rB |
| Purpose: Bit flip a 54-bit register |
| Description: Invert all bits of the 54-bit rB:rB+1 register value and store the result in rA:rA+1. |
| Operation: rA:rA+1 ← ~rB:rB+1 |
| Flags affected: Z C O S |
|
| Format: BRcc rA |
| Purpose: Conditional branch to a register |
Description: If the specified condition is true then the value in rA is placed into the program counter.
The condition table is as follows:
| cc | Value | Description | Flag State Checked |
| n | 0000 | Not Equal / Not Zero | Z == 0 |
| e | 0001 | Equal / Zero | Z == 1 |
| l | 0010 | Less Than | C == 1 AND Z == 0 |
| le | 0011 | Less Than or Equal | C == 1 OR Z == 1 |
| g | 0100 | Greater Than | C == 0 AND Z == 0 |
| ge | 0101 | Greater Than or Equal | C == 0 OR Z == 1 |
| no | 0110 | Not Overflow | O == 0 |
| o | 0111 | Overflow | O == 1 |
| ns | 1000 | Not Signed | S == 0 |
| s | 1001 | Signed | S == 1 |
| sl | 1010 | Signed Less Than | S != O |
| sle | 1011 | Signed Less Than or Equal | S != O OR Z == 1 |
| sg | 1100 | Signed Greater Than | S == O AND Z == 0 |
| sge | 1101 | Signed Greater Than or Equal | S == O |
| 1111 | Always | |
|
Operation:
if Flags == Condition then
PC = rA |
| Flags affected: |
|
| Format: BRA Location |
| Purpose: Branch to a set absolute location |
| Description: The program counter is set to the specified 27-bit location. |
| Operation: PC = Location |
| Flags affected: |
|
| Format: BRR Offset |
| Purpose: Branch to a relative offset |
| Description: The 27-bit offset is added to the current program counter. |
| Operation: PC = PC + Offset |
| Flags affected: |
|
| Format: Ccc Offset |
| Purpose: Conditional call to an offset |
Description: If the specified condition is true then the current program counter + 3 is saved into the RA register and the sign extended offset is added to the current program counter.
The condition table is as follows:
| cc | Value | Description | Flag State Checked |
| n | 0000 | Not Equal / Not Zero | Z == 0 |
| e | 0001 | Equal / Zero | Z == 1 |
| l | 0010 | Less Than | C == 1 AND Z == 0 |
| le | 0011 | Less Than or Equal | C == 1 OR Z == 1 |
| g | 0100 | Greater Than | C == 0 AND Z == 0 |
| ge | 0101 | Greater Than or Equal | C == 0 OR Z == 1 |
| no | 0110 | Not Overflow | O == 0 |
| o | 0111 | Overflow | O == 1 |
| ns | 1000 | Not Signed | S == 0 |
| s | 1001 | Signed | S == 1 |
| sl | 1010 | Signed Less Than | S != O |
| sle | 1011 | Signed Less Than or Equal | S != O OR Z == 1 |
| sg | 1100 | Signed Greater Than | S == O AND Z == 0 |
| sge | 1101 | Signed Greater Than or Equal | S == O |
| 1111 | Always | |
|
Operation:
if Flags == Condition then
RA = PC + 3
PC += (signed)Offset |
| Flags affected: |
|
| Format: CAA Location |
| Purpose: Call to a set absolute location |
| Description: The current program counter + 4 is stored into RA and the program counter is set to the specified 27-bit location. |
Operation:
RA = PC + 4
PC = Location |
| Flags affected: |
|
| Format: CAR Offset |
| Purpose: Call to a relative offset |
| Description: The current program counter + 4 is stored into RA and the 27-bit offset is added to the current program counter. |
Operation:
RA = PC + 4
PC = PC + Offset |
| Flags affected: |
|
| Format: CM rA, rB |
| Purpose: Compare two registers |
| Description: The 27-bit values in rB is subtracted from rA. The flags are set appropriately. |
Operation:
FLAGS = FLAGS & ~0xF
28-bit temp = rA - rB
if temp == 0 then
ZERO FLAG = 1
if temp & 0x4000000 then
SIGNED FLAG = 1
if (temp & 0x4000000) != (rA & 0x4000000) then
OVERFLOW FLAG = 1
if (temp & 0x8000000) then
CARRY FLAG = 1 |
| Flags affected: Z S O C |
|
| Format: CMF rA, rB |
| Purpose: Compare two floating point registers |
| Description: The 27-bit floating point value in rB is subtracted from the floating point rA. The flags are set appropriately. |
Operation:
FLAGS = FLAGS & ~0xF
temp = rA - rB
if temp == 0.0 then
ZERO FLAG = 1
if temp < 0.0 then
SIGNED FLAG = 1
if (temp < 0.0) != (rA < 0.0) then
OVERFLOW FLAG = 1 |
| Flags affected: Z S O |
|
| Format: CMFM rA, rB |
| Purpose: Compare two floating point registers |
| Description: The 54-bit floating point value in rB is subtracted from the floating point rA. The flags are set appropriately. |
Operation:
FLAGS = FLAGS & ~0xF
temp = rA:rA+1 - rB:rB+1
if temp == 0 then
ZERO FLAG = 1
if temp < 0.0 then
SIGNED FLAG = 1
if (temp < 0.0) != (rA:rA+1 < 0.0) then
OVERFLOW FLAG = 1 |
| Flags affected: Z S O |
|
| Format: CMI rA, IMM |
| Purpose: Compare a register and immediate value |
| Description: The sign extended immediate value is subtracted from the 27-bit rA. The flags are set appropriately. |
Operation:
FLAGS = FLAGS & ~0xF
28-bit temp = rA - (signed)IMM
if temp == 0 then
ZERO FLAG = 1
if temp & 0x4000000 then
SIGNED FLAG = 1
if (temp & 0x4000000) != (rA & 0x4000000) then
OVERFLOW FLAG = 1
if (temp & 0x8000000) then
CARRY FLAG = 1 |
| Flags affected: Z S O C |
|
| Format: CMIM rA, IMM |
| Purpose: Compare a register and immediate value |
| Description: The sign extended immediate value is subtracted from the 54-bit rA:rA+1. The flags are set appropriately. |
Operation:
FLAGS = FLAGS & ~0xF
55-bit temp = rA:rA+1 - (signed)IMM
if temp == 0 then
ZERO FLAG = 1
if temp & 0x20000000000000 then
SIGNED FLAG = 1
if ((temp & 0x20000000000000) !=
(rA:rA+1 & 0x20000000000000)) then
OVERFLOW FLAG = 1
if (temp & 0x40000000000000) then
CARRY FLAG = 1 |
| Flags affected: Z S O C |
|
| Format: CMM rA, rB |
| Purpose: Compare two registers |
| Description: The 54-bit values in rB:rB+1 is subtracted from rA:rA+1. The flags are set appropriately. |
Operation:
FLAGS = FLAGS & ~0xF
55-bit temp = rA:rA+1 - rB:rB+1
if temp == 0 then
ZERO FLAG = 1
if temp & 0x20000000000000 then
SIGNED FLAG = 1
if ((temp & 0x20000000000000) !=
(rA:rA+1 & 0x20000000000000)) then
OVERFLOW FLAG = 1
if (temp & 0x40000000000000) then
CARRY FLAG = 1 |
| Flags affected: Z S O C |
|
| Format: CRcc rA |
| Purpose: Conditional call to a register |
Description: If the specified condition is true then the current program counter + 2 is saved into the RA register and the program counter is set to the value in rA.
The condition table is as follows:
| cc | Value | Description | Flag State Checked |
| n | 0000 | Not Equal / Not Zero | Z == 0 |
| e | 0001 | Equal / Zero | Z == 1 |
| l | 0010 | Less Than | C == 1 AND Z == 0 |
| le | 0011 | Less Than or Equal | C == 1 OR Z == 1 |
| g | 0100 | Greater Than | C == 0 AND Z == 0 |
| ge | 0101 | Greater Than or Equal | C == 0 OR Z == 1 |
| no | 0110 | Not Overflow | O == 0 |
| o | 0111 | Overflow | O == 1 |
| ns | 1000 | Not Signed | S == 0 |
| s | 1001 | Signed | S == 1 |
| sl | 1010 | Signed Less Than | S != O |
| sle | 1011 | Signed Less Than or Equal | S != O OR Z == 1 |
| sg | 1100 | Signed Greater Than | S == O AND Z == 0 |
| sge | 1101 | Signed Greater Than or Equal | S == O |
| 1111 | Always | |
|
Operation:
if Flags == Condition then
RA = PC + 2
PC = rA |
| Flags affected: |
|
| Format: DBRK |
| Purpose: Debug break |
| Description: A special instruction for emulators to allow forcing a break in the emulation. Normal execution will cause an illegal instruction fault. |
| Operation: |
| Flags affected: |
|
| Format: DI rA |
| Purpose: Disable interrupts based on rA |
| Description: Disable interrupts based on the mask in rA. |
| Operation: FLAGS = (FLAGS & 0x7FFE00F) | ((~rA << 4) & 0x1FF0) |
| Flags affected: |
|
| Format: DMT rA, rB, rC |
| Purpose: Directly transfer memory between locations |
| Description: Directly transfer rC bytes of memory from location pointed to by rB to memory location rA. |
Operation:
P = 0
while(P < rC)
(byte)[rA + P] = (byte)[rB + P]
P = P + 1 |
| Flags affected: |
|
| Format: DV rA, rB, rC |
| Purpose: Divide two 27-bit integer registers |
| Description: The 27-bit value in rB is divided with the 27-bit value in rC, the result is placed in rA. |
| Operation: rA ← rB / rC |
| Flags affected: Z C O S |
|
| Format: DVF rA, rB, rC |
| Purpose: Divide two 27-bit floating point registers |
| Description: The 27-bit floating point value in rB is divided with the 27-bit floating point value in rC, the result is placed in rA. |
| Operation: rA ← rB / rC |
| Flags affected: Z C O S |
|
| Format: DVFM rA, rB, rC |
| Purpose: Divide two 54-bit floating point registers |
| Description: The 54-bit floating point value in rB:rB+1 is divided with the 54-bit floating point value in rC:rC+1, the result is placed in rA:rA+1. |
| Operation: rA:rA+1 ← rB:rB+1 / rC:rC+1 |
| Flags affected: Z C O S |
|
|
|
|
|
26 |
| 0001100 | rA | rB | Immediate | 01 | UF |
|
| Format: DVI rA, rB, IMM |
| Purpose: Divide a 27-bit integer register by a 7-bit immediate |
| Description: The 27-bit value in rB is divided with the 7-bit immediate value, the result is placed in rA. |
| Operation: rA ← rB / IMM |
| Flags affected: Z C O S |
|
|
|
|
|
26 |
| 0001110 | rA | rB | Immediate | 01 | UF |
|
| Format: DVIM rA, rB, IMM |
| Purpose: Divide a 54-bit integer register by a 7-bit immediate |
| Description: The 54-bit value in rB:rB+1 is divided with the 7-bit immediate value, the result is placed in rA:rA+1. |
| Operation: rA:rA+1 ← rB:rB+1 / IMM |
| Flags affected: Z C O S |
|
|
|
|
|
26 |
| 0001100 | rA | rB | Immediate | 11 | UF |
|
| Format: DVIS rA, rB, IMM |
| Purpose: Divide a signed 27-bit integer register by a signed 7-bit immediate |
| Description: The signed 27-bit value in rB is divided with the signed 7-bit immediate value, the result is placed in rA. |
| Operation: rA ← (signed)rB / (signed)IMM |
| Flags affected: Z C O S |
|
|
|
|
|
26 |
| 0001110 | rA | rB | Immediate | 11 | UF |
|
| Format: DVISM rA, rB, IMM |
| Purpose: Divide a signed 54-bit integer register by a signed 7-bit immediate |
| Description: The signed 54-bit value in rB:rB+1 is divided with the signed 7-bit immediate value, the result is placed in rA:rA+1. |
| Operation: rA:rA+1 ← (signed)rB:rB+1 / (signed)IMM |
| Flags affected: Z C O S |
|
| Format: DVM rA, rB, rC |
| Purpose: Divide two 54-bit integer registers |
| Description: The 54-bit value in rB:rB+1 is divided with the 54-bit value in rC:rC+1, the result is placed in rA:rA+1. |
| Operation: rA:rA+1 ← rB:rB+1 / rC:rC+1 |
| Flags affected: Z C O S |
|
| Format: DVS rA, rB, rC |
| Purpose: Divide two signed 27-bit integer registers |
| Description: The signed 27-bit value in rB is divided with the signed 27-bit value in rC, the result is placed in rA. |
| Operation: rA ← (signed)rB / (signed)rC |
| Flags affected: Z C O S |
|
| Format: DVSM rA, rB, rC |
| Purpose: Divide two 54-bit integer registers |
| Description: The 54-bit value in rB:rB+1 is divided with the 54-bit value in rC:rC+1, the result is placed in rA:rA+1. |
| Operation: rA:rA+1 ← (signed)rB:rB+1 / (signed)rC:rC+1 |
| Flags affected: Z C O S |
|
| Format: EI rA |
| Purpose: Enable interrupts base on rA |
| Description: Enable interrupts based on the mask in rA. |
| Operation: FLAGS = (FLAGS & 0x7FFE00F) | ((rA << 4) & 0x1FF0) |
| Flags affected: |
|
| Format: FTI rA, rB |
| Purpose: Convert a 27-bit float to integer |
| Description: The 27-bit float in rB in converted to a 27-bit integer value and stored in rA. |
| Operation: rA ← int(rB) |
| Flags affected: Z C O S |
|
| Format: FTIM rA, rB |
| Purpose: Convert a 54-bit float to integer |
| Description: The 54-bit float in rB:rB+1 in converted to a 54-bit integer value and stored in rA:rA+1. |
| Operation: rA:rA+1 ← int(rB:rB+1) |
| Flags affected: Z C O S |
|
| Format: HT |
| Purpose: Halt the processor |
| Description: Disables all interrupts and stops the processor from responding to any more instructions. |
| Operation: |
| Flags affected: |
|
| Format: IR |
| Purpose: Return from an interrupt |
| Description: Return from an interrupt routine. |
Operation:
if Stack_Direction_Flag then
SP -= 0x63
R0:R31 ← [SP:SP+0x60]
FLAGS ← [SP+0x60:SP+0x63]
if not Stack_Direction_Flag then
SP += 0x63 |
| Flags affected: Z C O S |
|
| Format: ITF rA, rB |
| Purpose: Convert a 27-bit integer to float |
| Description: The 27-bit integer in rB in converted to a 27-bit float value and stored in rA. |
| Operation: rA ← float(rB) |
| Flags affected: Z C O S |
|
| Format: ITFM rA, rB |
| Purpose: Convert a 54-bit integer to float |
| Description: The 54-bit integer in rB:rB+1 in converted to a 54-bit float value and stored in rA:rA+1. |
| Operation: rA:rA+1 ← float(rB:rB+1) |
| Flags affected: Z C O S |
|
|
|
|
|
|
|
| 1010100 | rA | rB | Register Count | Adjust rB | Memory Offset | 000 |
|
| Format: LDSm rA, [rB + Offset, RegCount] |
| Purpose: Load a single byte from memory |
Description: The value in rB is added to Offset and a single byte per register is loaded into the low 9 bits of rA to rA+RegCount. The top 18 bits are set to zero for each affected register.
m refers to the Adjust RB value which can have the following designations to indicate the mode:
| 0 | rB is not adjusted after load |
| I | 1 | rB has the number of bytes read added to the start value after all data is read |
| D | 2 | rB has the number of bytes to read subtracted from the start value after all data is read |
|
Operation:
StartReg = rA
RegCount = RegCount + 1
CurCount = RegCount
Temp = rB
TempPC = PC
if Mode is 2 then
Temp = Temp - CurCount
MemLocation = (Temp + Offset)
While CurCount is not 0
Registers[StartReg] = Memory[MemLocation]
MemLocation += 1
StartReg = (StartReg + 1) % 32
CurCount = CurCount - 1
if Mode is 1 then
rB = rB + RegCount
if Mode is 2 then
rB = Temp
PC = TempPC |
| Flags affected: |
|
|
|
|
|
|
|
| 1010110 | rA | rB | Register Count | Adjust rB | Memory Offset | 000 |
|
| Format: LDTm rA, [rB + Offset, RegCount] |
| Purpose: Load three bytes from memory |
Description: The value in rB is added to Offset and three bytes per register are loaded into rA to rA+RegCount.
m refers to the Adjust RB value which can have the following designations to indicate the mode:
| 0 | rB is not adjusted after load |
| I | 1 | rB has the number of bytes read added to the start value after all data is read |
| D | 2 | rB has the number of bytes to read subtracted from the start value after all data is read |
|
Operation:
StartReg = rA
RegCount = RegCount + 1
CurCount = RegCount
Temp = rB
TempPC = PC
if Mode is 2 then
Temp = Temp - (CurCount * 3)
MemLocation = (Temp + Offset)
While CurCount is not 0
Registers[StartReg] =
(Memory[MemLocation] << 9) |
(Memory[(MemLocation + 1)] << 18) |
Memory[(MemLocation + 2)]
MemLocation += 3
StartReg = (StartReg + 1) % 32
CurCount = CurCount - 1
if Mode is 1 then
rB = rB + (RegCount * 3)
if Mode is 2 then
rB = Temp
PC = TempPC |
| Flags affected: |
|
|
|
|
|
|
|
| 1010101 | rA | rB | Register Count | Adjust rB | Memory Offset | 000 |
|
| Format: LDWm rA, [rB + Offset, RegCount] |
| Purpose: Load two bytes from memory |
Description: The value in rB is added to Offset and two bytes per register are loaded into the low 18 bits of rA to rA+RegCount. The top 9 bits are set to zero for each affected register.
m refers to the Adjust RB value which can have the following designations to indicate the mode:
| 0 | rB is not adjusted after load |
| I | 1 | rB has the number of bytes read added to the start value after all data is read |
| D | 2 | rB has the number of bytes to read subtracted from the start value after all data is read |
|
Operation:
StartReg = rA
RegCount = RegCount + 1
CurCount = RegCount
Temp = rB
TempPC = PC
if Mode is 2 then
Temp = Temp - (CurCount * 2)
MemLocation = (Temp + Offset)
While CurCount is not 0
Registers[StartReg] =
(Memory[MemLocation] << 9) | Memory[(MemLocation + 1)]
MemLocation += 2
StartReg = (StartReg + 1) % 32
CurCount = CurCount - 1
if Mode is 1 then
rB = rB + (RegCount * 2)
if Mode is 2 then
rB = Temp
PC = TempPC |
| Flags affected: |
|
| Format: MD rA, rB, rC |
| Purpose: Access the remainder of dividing two 27-bit integer registers |
| Description: The 27-bit value in rB is divided with the 27-bit value in rC, the remainder of the division is placed in rA. |
| Operation: rA ← rB % rC |
| Flags affected: Z C O S |
|
| Format: MDF rA, rB, rC |
| Purpose: Access the remainder of dividing two 27-bit floating point registers |
| Description: The 27-bit floating point value in rB is divided with the 27-bit floating point value in rC, the remainder of the division is placed in rA. |
| Operation: rA ← rB % rC |
| Flags affected: Z C O S |
|
| Format: MDFM rA, rB, rC |
| Purpose: Access the remainder of dividing two 54-bit floating point registers |
| Description: The 54-bit floating point value in rB:rB+1 is divided with the 54-bit floating point value in rC:rC+1, the remainder of the division is placed in rA:rA+1. |
| Operation: rA:rA+1 ← rB:rB+1 % rC:rC+1 |
| Flags affected: Z C O S |
|
|
|
|
|
26 |
| 0010000 | rA | rB | Immediate | 01 | UF |
|
| Format: MDI rA, rB, IMM |
| Purpose: Access the remainder of dividing a 27-bit integer register by a 7-bit immediate |
| Description: The 27-bit value in rB is divided with a 7-bit immediate value, the remainder of the division is placed in rA. |
| Operation: rA ← rB % IMM |
| Flags affected: Z C O S |
|
|
|
|
|
26 |
| 0010010 | rA | rB | Immediate | 01 | UF |
|
| Format: MDIM rA, rB, IMM |
| Purpose: Access the remainder of dividing a 54-bit integer register by a 7-bit immediate |
| Description: The 54-bit value in rB:rB+1 is divided with the 7-bit immediate value, the remainder of the division is placed in rA:rA+1. |
| Operation: rA:rA+1 ← rB:rB+1 % IMM |
| Flags affected: Z C O S |
|
|
|
|
|
26 |
| 0010000 | rA | rB | Immediate | 11 | UF |
|
| Format: MDIS rA, rB, IMM |
| Purpose: Access the remainder of dividing a signed 27-bit integer register by a signed 7-bit immediate |
| Description: The signed 27-bit value in rB is divided with a signed 7-bit immediate value, the remainder of the division is placed in rA. |
| Operation: rA ← (signed)rB % (signed)IMM |
| Flags affected: Z C O S |
|
|
|
|
|
26 |
| 0010010 | rA | rB | Immediate | 11 | UF |
|
| Format: MDISM rA, rB, IMM |
| Purpose: Access the remainder of dividing a signed 54-bit integer register by a signed 7-bit immediate |
| Description: The signed 54-bit value in rB:rB+1 is divided with the signed 7-bit immediate value, the remainder of the division is placed in rA:rA+1. |
| Operation: rA:rA+1 ← (signed)rB:rB+1 % (signed)IMM |
| Flags affected: Z C O S |
|
| Format: MDM rA, rB, rC |
| Purpose: Access the remainder of dividing two 54-bit integer registers |
| Description: The 54-bit value in rB:rB+1 is divided with the 54-bit value in rC:rC+1, the remainder of the division is placed in rA:rA+1. |
| Operation: rA:rA+1 ← rB:rB+1 % rC:rC+1 |
| Flags affected: Z C O S |
|
| Format: MDS rA, rB, rC |
| Purpose: Access the remainder of dividing two signed 27-bit integer registers |
| Description: The signed 27-bit value in rB is divided with the signed 27-bit value in rC, the remainder of the division is placed in rA. |
| Operation: rA ← (signed)rB % (signed)rC |
| Flags affected: Z C O S |
|
| Format: MDSM rA, rB, rC |
| Purpose: Access the remainder of dividing two signed 54-bit integer registers |
| Description: The signed 54-bit value in rB:rB+1 is divided with the signed 54-bit value in rC:rC+1, the remainder of the division is placed in rA:rA+1. |
| Operation: rA:rA+1 ← (signed)rB:rB+1 % (signed)rC:rC+1 |
| Flags affected: Z C O S |
|
| Format: MH rA, IMM |
| Purpose: Move an immediate value to the high bits of a register |
| Description: The high 17 bits of a 27-bit value in rA is set to the specified immediate value. |
| Operation: rA ← (IMM << 10) | (rA & 0x3FF) |
| Flags affected: Z C O S |
|
| Format: ML rA, IMM |
| Purpose: Move a 17-bit immediate value to the register |
| Description: A 27-bit rA is set to the specified 17-bit immediate value. The high bits are zero'd out. |
| Operation: rA ← IMM |
| Flags affected: Z C O S |
|
| Format: MS rA, IMM |
| Purpose: Move a signed 17-bit immediate value to the register |
| Description: A 27-bit rA is set to the specified signed 17-bit immediate value. The high bits are set based on the signed bit of the immediate value specified. |
| Operation: rA ← (signed)IMM |
| Flags affected: Z C O S |
|
| Format: MU rA, rB, rC |
| Purpose: Multiply two 27-bit integer registers together |
| Description: The 27-bit value in rC is multiplied with the 27-bit value in rB, the result is placed in rA. |
| Operation: rA ← rB * rC |
| Flags affected: Z C O S |
|
| Format: MUF rA, rB, rC |
| Purpose: Multiply two 27-bit floating point registers together |
| Description: The 27-bit floating point value in rC is multiplied with the 27-bit floating point value in rB, the result is placed in rA. |
| Operation: rA ← rB * rC |
| Flags affected: Z C O S |
|
| Format: MUFM rA, rB, rC |
| Purpose: Multiply two 54-bit floating point registers together |
| Description: The 54-bit floating point value in rC:rC+1 is multiplied with the 54-bit floating point value in rB:rB+1, the result is placed in rA:rA+1. |
| Operation: rA:rA+1 ← rB:rB+1 * rC:rC+1 |
| Flags affected: Z C O S |
|
|
|
|
|
26 |
| 0001000 | rA | rB | Immediate | 01 | UF |
|
| Format: MUI rA, rB, IMM |
| Purpose: Multiply a 27-bit integer register by a 7-bit immediate |
| Description: The 7-bit immediate value is multiplied with the 27-bit value in rB, the result is placed in rA. |
| Operation: rA ← rB * IMM |
| Flags affected: Z C O S |
|
|
|
|
|
26 |
| 0001010 | rA | rB | Immediate | 01 | UF |
|
| Format: MUIM rA, rB, IMM |
| Purpose: Multiply a 54-bit integer register by a 7-bit immediate |
| Description: The 7-bit immediate value is multiplied with the 54-bit value in rB:rB+1, the result is placed in rA:rA+1. |
| Operation: rA:rA+1 ← rB:rB+1 * IMM |
| Flags affected: Z C O S |
|
|
|
|
|
26 |
| 0001000 | rA | rB | Immediate | 11 | UF |
|
| Format: MUIS rA, rB, IMM |
| Purpose: Multiply a signed 27-bit integer register by a signed 7-bit immediate |
| Description: The signed 7-bit immediate value is multiplied with the signed 27-bit value in rB, the result is placed in rA. |
| Operation: rA ← (signed)rB * (signed)IMM |
| Flags affected: Z C O S |
|
|
|
|
|
26 |
| 0001010 | rA | rB | Immediate | 11 | UF |
|
| Format: MUISM rA, rB, IMM |
| Purpose: Multiply a signed 54-bit integer register by a signed 7-bit immediate |
| Description: The signed 7-bit immediate value is multiplied with the signed 54-bit value in rB:rB+1, the result is placed in rA:rA+1. |
| Operation: rA:rA+1 ← (signed)rB:rB+1 * (signed)IMM |
| Flags affected: Z C O S |
|
| Format: MUM rA, rB, rC |
| Purpose: Multiply two 54-bit integer registers together |
| Description: The 54-bit value in rC:rC+1 is multiplied with the 54-bit value in rB:rB+1, the result is placed in rA:rA+1. |
| Operation: rA:rA+1 ← rB:rB+1 * rC:rC+1 |
| Flags affected: Z C O S |
|
| Format: MUS rA, rB, rC |
| Purpose: Multiply two signed 27-bit integer registers together |
| Description: The signed 27-bit value in rC is multiplied with the signed 27-bit value in rB, the result is placed in rA. |
| Operation: rA ← (signed)rB * (signed)rC |
| Flags affected: Z C O S |
|
| Format: MUSM rA, rB, rC |
| Purpose: Multiply two 54-bit integer registers together |
| Description: The signed 54-bit value in rC:rC+1 is multiplied with the signed 54-bit value in rB:rB+1, the result is placed in rA:rA+1. |
| Operation: rA:rA+1 ← (signed)rB:rB+1 * (signed)rC:rC+1 |
| Flags affected: Z C O S |
|
|
|
|
26 |
| 101001100 | rA | rB | 0000000 | UF |
|
| Format: NG rA, rB |
| Purpose: Negate a 27-bit register |
| Description: Negate the 27-bit rB register value and store the result in rA. |
| Operation: rA ← -rB |
| Flags affected: Z C O S |
|
|
|
|
26 |
| 101001101 | rA | rB | 0000000 | UF |
|
| Format: NGF rA, rB |
| Purpose: Negate a 27-bit floating-point register |
| Description: Negate the 27-bit rB floating-point register value and store the result in rA. |
| Operation: rA ← -rB |
| Flags affected: Z S |
|
|
|
|
26 |
| 101001111 | rA | rB | 0000000 | UF |
|
| Format: NGFM rA, rB |
| Purpose: Negate a 54-bit floating-point register |
| Description: Negate the 54-bit rB:rB+1 floating-point register value and store the result in rA:rA+1. |
| Operation: rA:rA+1 ← -rB:rB+1 |
| Flags affected: Z S |
|
|
|
|
26 |
| 101001110 | rA | rB | 0000000 | UF |
|
| Format: NGM rA, rB |
| Purpose: Negate a 54-bit register |
| Description: Negate the 54-bit rB:rB+1 register value and store the result in rA:rA+1. |
| Operation: rA:rA+1 ← -rB:rB+1 |
| Flags affected: Z C O S |
|
|
|
|
26 |
| 101001100 | rA | rB | 0100000 | UF |
|
| Format: NT rA, rB |
| Purpose: Bit test a 27-bit register |
| Description: Test all bits of the 27-bit rB register value. If any bits are set then rA is set to 0. If all bits are off then rA is set to 1. |
| Operation: rA ← !rB |
| Flags affected: Z C O S |
|
|
|
|
26 |
| 101001110 | rA | rB | 0100000 | UF |
|
| Format: NTM rA, rB |
| Purpose: Bit test a 54-bit register |
| Description: Test all bits of the 54-bit rB:rB+1 register value. If any bits are set then rA:rA+1 is set to 0. If all bits are off then rA:rA+1 is set to 1. |
| Operation: rA:rA+1 ← !rB:rB+1 |
| Flags affected: Z C O S |
|
| Format: OR rA, rB, rC |
| Purpose: Bit-wise OR two 27-bit integer registers together |
| Description: The 27-bit value in rC is bit-wise OR to the 27-bit value in rB, the result is placed in rA. |
| Operation: rA ← rB | rC |
| Flags affected: Z C O S |
|
|
|
|
|
26 |
| 0011000 | rA | rB | Immediate | 01 | UF |
|
| Format: ORI rA, rB, IMM |
| Purpose: Bit-wise OR a 27-bit integer register and 7-bit immediate together |
| Description: The 7-bit immediate value is bit-wise OR to the 27-bit value in rB, the result is placed in rA. |
| Operation: rA ← rB | IMM |
| Flags affected: Z C O S |
|
| Format: ORM rA, rB, rC |
| Purpose: Bit-wise OR two 54-bit integer registers together |
| Description: The 54-bit value in rC:rC+1 is bit-wise OR to the 54-bit value in rB:rB+1, the result is placed in rA:rA+1. |
| Operation: rA:rA+1 ← rB:rB+1 | rC:rC+1 |
| Flags affected: Z C O S |
|
| Format: RE |
| Purpose: To return from a call |
| Description: To return from a call. |
| Operation: PC ← RETADDR |
| Flags affected: |
|
| Format: RF rA |
| Purpose: Read flags into the rA register |
| Description: Set rA to the value in the flag register. |
| Operation: rA = FLAGS |
| Flags affected: |
|
| Format: RL rA, rB, rC |
| Purpose: Rotate left a 27-bit integer |
| Description: The 27-bit value in rB is left rotated the number of bits specified in rC. The result is placed in rA. |
| Operation: rA ← (rB << rC) | (rB >> (27-rC)) |
| Flags affected: Z C O S |
|
|
|
|
|
26 |
| 1000000 | rA | rB | Immediate | 00 | UF |
|
| Format: RLI rA, rB, IMM |
| Purpose: Rotate left a 27-bit integer by a 7-bit immediate value |
| Description: The 27-bit value in rB is left rotated by the 7-bit immediate value. The result is placed in rA. |
| Operation: rA ← (rB << IMM) | (rB >> (27-IMM)) |
| Flags affected: Z C O S |
|
|
|
|
|
26 |
| 1000010 | rA | rB | Immediate | 00 | UF |
|
| Format: RLIM rA, rB, IMM |
| Purpose: Rotate left a 54-bit integer by a 7-bit immediate value |
| Description: The 54-bit value in rB:rB+1 is left rotated by the 7-bit immediate value. The result is placed in rA:rA+1. |
| Operation: rA:rA+1 ← (rB:rB+1 << IMM) | (rB:rB+1 >> (54-IMM)) |
| Flags affected: Z C O S |
|
| Format: RLM rA, rB, rC |
| Purpose: Rotate left a 54-bit integer |
| Description: The 54-bit value in rB:rB+1 is left rotated the number of bits specified in rC. The result is placed in rA:rA+1. |
| Operation: rA:rA+1 ← (rB:rB+1 << rC) | (rB:rB+1 >> (54-rC)) |
| Flags affected: Z C O S |
|
| Format: RMP rA, rB |
| Purpose: Read the memory protections for a page of memory |
Description: rA is set to the page protection flags of the pages of the specified memory range starting at the memory location specified by rA and moving forward rB pages. A set zero flag indicates success, upon failure rA holds the error reason. Every 2 bits indicates the memory protection state of a page. Only 13 page statuses can be returned at a time.
Errors:
| 0 | Memory start is not page aligned |
| 1 | Too many pages specified |
Flags:
| 0 | No access |
| 1 | Read |
| 2 | Read/Write |
| 3 | Read/Execute |
|
Operation:
rA ←
Memory_Page_Flags[rA]:Memory_Page_Flags[rA+(rB*1024)] |
| Flags affected: Z |
|
|
|
26 |
| 101001100 | rA | 000001100000 | UF |
|
| Format: RND rA |
| Purpose: Generate a random value into rA |
| Description: A random value is placed into the 27-bit rA register. |
| Operation: rA ← <random value> |
| Flags affected: Z C O S |
|
|
|
26 |
| 101001110 | rA | 000001100000 | UF |
|
| Format: RNDM rA |
| Purpose: Generate a random value into rA:rA+1 |
| Description: A random value is generated and placed into the 54-bit rA:rA+1 register. |
| Operation: rA:rA+1 ← <random value> |
| Flags affected: Z C O S |
|
| Format: RR rA, rB, rC |
| Purpose: Rotate right a 27-bit integer |
| Description: The 27-bit value in rB is right rotated the number of bits specified in rC. The result is placed in rA. |
| Operation: rA ← (rB >> rC) | (rB << (27-rC)) |
| Flags affected: Z C O S |
|
|
|
|
|
26 |
| 1000001 | rA | rB | Immediate | 00 | UF |
|
| Format: RRI rA, rB, IMM |
| Purpose: Rotate right a 27-bit integer by a 7-bit immediate value |
| Description: The 27-bit value in rB is right rotated by the 7-bit immediate value. The result is placed in rA. |
| Operation: rA ← (rB >> IMM) | (rB << (27-IMM)) |
| Flags affected: Z C O S |
|
|
|
|
|
26 |
| 1000011 | rA | rB | Immediate | 00 | UF |
|
| Format: RRIM rA, rB, rC |
| Purpose: Rotate right a 54-bit integer by an immediate value |
| Description: The 54-bit value in rB:rB+1 is right rotated by the 7-bit immediate value. The result is placed in rA:rA+1. |
| Operation: rA:rA+1 ← (rB:rB+1 >> IMM) | (rB:rB+1 << (54-IMM)) |
| Flags affected: Z C O S |
|
| Format: RRM rA, rB, rC |
| Purpose: Rotate right a 54-bit integer |
| Description: The 54-bit value in rB:rB+1 is right rotated the number of bits specified in rC. The result is placed in rA:rA+1. |
| Operation: rA:rA+1 ← (rB:rB+1 >> rC) | (rB:rB+1 << (54-rC)) |
| Flags affected: Z C O S |
|
| Format: SA rA, rB, rC |
| Purpose: Shift right arithmetic a 27-bit integer |
| Description: The 27-bit value in rB is right arithmetic shifted the number of bits specified in rC. The result is placed in rA. |
| Operation: rA ← (signed)rB >> rC |
| Flags affected: Z C O S |
|
|
|
|
|
26 |
| 0111101 | rA | rB | Immediate | 00 | UF |
|
| Format: SAI rA, rB, IMM |
| Purpose: Shift right arithmetic a 27-bit integer by a 7-bit immediate value |
| Description: The 27-bit value in rB is right arithmetic shifted by the 7-bit immediate value. The result is placed in rA. |
| Operation: rA ← (signed)rB >> IMM |
| Flags affected: Z C O S |
|
|
|
|
|
26 |
| 0111111 | rA | rB | Immediate | 00 | UF |
|
| Format: SAIM rA, rB, IMM |
| Purpose: Shift right arithmetic a 54-bit integer by a 7-bit immediate value |
| Description: The 54-bit value in rB:rB+1 is right arithmetic shifted by the 7-bit immediate value. The result is placed in rA:rA+1. |
| Operation: rA:rA+1 ← (signed)rB:rB+1 >> IMM |
| Flags affected: Z C O S |
|
| Format: SAM rA, rB, rC |
| Purpose: Shift right arithmetic a 54-bit integer |
| Description: The 54-bit value in rB:rB+1 is right arithmetic shifted the number of bits specified in rC. The result is placed in rA:rA+1. |
| Operation: rA:rA+1 ← (signed)rB:rB+1 >> rC |
| Flags affected: Z C O S |
|
| Format: SB rA, rB, rC |
| Purpose: Subtract two 27-bit integer registers from each other |
| Description: The 27-bit value in rC is subtracted from the 27-bit value in rB, the result is placed in rA. |
| Operation: rA ← rB - rC |
| Flags affected: Z C O S |
|
| Format: SBC rA, rB, rC |
| Purpose: Subtract two 27-bit integer registers from each other including the carry bit |
| Description: The 27-bit value in rC is subtracted from the 27-bit value in rB, the carry bit from any previous operation is subtracted from the result. The result is placed in rA. |
| Operation: rA ← rB - rC - Carry_Bit |
| Flags affected: Z C O S |
|
|
|
|
|
26 |
| 0100100 | rA | rB | Immediate | 01 | UF |
|
| Format: SBCI rA, rB, IMM |
| Purpose: Subtract a 7-bit immediate from a 27-bit integer register including the carry bit |
| Description: The 7-bit immediate value is subtracted from the 27-bit value in rB, the carry bit from any previous operation is subtracted from the result. The result is placed in rA. |
| Operation: rA ← rB - IMM - Carry_Bit |
| Flags affected: Z C O S |
|
|
|
|
|
26 |
| 0100110 | rA | rB | Immediate | 01 | UF |
|
| Format: SBCIM rA, rB, IMM |
| Purpose: Subtract a 7-bit immediate from a 54-bit integer register including the carry bit |
| Description: The 7-bit immediate value is subtracted from the 54-bit value in rB:rB+1, the carry bit from any previous operation is subtracted from the result. The result is placed in rA:rA+1. |
| Operation: rA:rA+1 ← rB:rB+1 - IMM - Carry_Bit |
| Flags affected: Z C O S |
|
| Format: SBCM rA, rB, rC |
| Purpose: Subtracted two 54-bit integer registers from each other including the carry bit |
| Description: The 54-bit value in rC:rC+1 is subtracted from the 54-bit value in rB:rB+1, the carry bit from any previous operation is subtracted from the result. The result is placed in rA:rA+1. |
| Operation: rA:rA+1 ← rB:rB+1 - rC:rC+1 - Carry_Bit |
| Flags affected: Z C O S |
|
| Format: SBF rA, rB, rC |
| Purpose: Subtract two 27-bit floating point registers from each other |
| Description: The 27-bit floating point value in rC is subtracted from to the 27-bit floating point value in rB, the result is placed in rA. |
| Operation: rA ← rB - rC |
| Flags affected: Z C O S |
|
| Format: SBFM rA, rB, rC |
| Purpose: Subtract two 54-bit floating point registers from each other |
| Description: The 54-bit floating point value in rC:rC+1 is subtracted from the 54-bit floating point value in rB:rB+1, the result is placed in rA:rA+1. |
| Operation: rA:rA+1 ← rB:rB+1 - rC:rC+1 |
| Flags affected: Z C O S |
|
|
|
|
|
26 |
| 0000100 | rA | rB | Immediate | 01 | UF |
|
| Format: SBI rA, rB, IMM |
| Purpose: Subtract a 7-bit immediate value from a 27-bit integer register |
| Description: The 7-bit immediate value is subtracted from the 27-bit value in rB, the result is placed in rA. |
| Operation: rA ← rB - IMM |
| Flags affected: Z C O S |
|
|
|
|
|
26 |
| 0000110 | rA | rB | Immediate | 01 | UF |
|
| Format: SBIM rA, rB, IMM |
| Purpose: Subtract a 7-bit immediate value from a 54-bit integer register |
| Description: The 7-bit immediate value is subtracted from the 54-bit value in rB:rB+1, the result is placed in rA:rA+1. |
| Operation: rA:rA+1 ← rB:rB+1 - IMM |
| Flags affected: Z C O S |
|
| Format: SBM rA, rB, rC |
| Purpose: Subtracted two 54-bit integer registers from each other |
| Description: The 54-bit value in rC:rC+1 is subtracted from the 54-bit value in rB:rB+1, the result is placed in rA:rA+1. |
| Operation: rA:rA+1 ← rB:rB+1 - rC:rC+1 |
| Flags affected: Z C O S |
|
| Format: SES rA, rB |
| Purpose: Sign extend from a byte |
| Description: Sign extend a single byte from register rB into the 27-bit rA. |
| Operation: rA ← (signed)(rB << 18) >> 18 |
| Flags affected: Z C O S |
|
| Format: SEW rA, rB |
| Purpose: Sign extend from two bytes |
| Description: Sign extend a 18-bit value from register rB into the 27-bit rA. |
| Operation: rA ← (signed)(rB << 9) >> 9 |
| Flags affected: Z C O S |
|
| Format: SF rA |
| Purpose: Set flag register to rA |
| Description: Set the flag register to the value in rA. |
| Operation: FLAGS = rA & 0x7FFFFFF |
| Flags affected: Z C O S |
|
| Format: SL rA, rB, rC |
| Purpose: Shift left a 27-bit integer |
| Description: The 27-bit value in rB is left shifted the number of bits specified in rC. The result is placed in rA. |
| Operation: rA ← rB << rC |
| Flags affected: Z C O S |
|
|
|
|
|
26 |
| 0111000 | rA | rB | Immediate | 00 | UF |
|
| Format: SLI rA, rB, IMM |
| Purpose: Shift left a 27-bit integer by a 7-bit immediate value |
| Description: The 27-bit value in rB is left shifted by the 7-bit immediate value. The result is placed in rA. |
| Operation: rA ← rB << IMM |
| Flags affected: Z C O S |
|
|
|
|
|
26 |
| 0111010 | rA | rB | Immediate | 00 | UF |
|
| Format: SLIM rA, rB, IMM |
| Purpose: Shift left a 54-bit integer by a 7-bit immediate value |
| Description: The 54-bit value in rB is left shifted by the 7-bit immediate value. The result is placed in rA:rA+1. |
| Operation: rA:rA+1 ← rB:rB+1 << IMM |
| Flags affected: Z C O S |
|
| Format: SLM rA, rB, rC |
| Purpose: Shift left a 54-bit integer |
| Description: The 54-bit value in rB:rB+1 is left shifted the number of bits specified in rC. The result is placed in rA:rA+1. |
| Operation: rA:rA+1 ← rB:rB+1 << rC |
| Flags affected: Z C O S |
|
|
|
17 |
|
|
| 1010010 | rA | rB | 1 | Memory Flags | 0000000 |
|
| Format: SMP rA, rB, FLAGS |
| Purpose: Set the memory protections for a range of pages of memory |
Description: Memory starting at a page boundary specified by rA has its page protection flags set to FLAGS for rB pages. A set zero flag indicates success. Upon failure rA holds the error reason.
Errors:
| 0 | Memory start is not page aligned |
| 1 | Too many pages specified |
Flags:
| 0 | No access |
| 1 | Read |
| 2 | Read/Write |
| 3 | Read/Execute |
|
| Operation: |
| Flags affected: Z |
|
| Format: SR rA, rB, rC |
| Purpose: Shift right a 27-bit integer |
| Description: The 27-bit value in rB is right shifted the number of bits specified in rC. The result is placed in rA. |
| Operation: rA ← rB >> rC |
| Flags affected: Z C O S |
|
|
|
|
|
26 |
| 0111001 | rA | rB | Immediate | 00 | UF |
|
| Format: SRI rA, rB, IMM |
| Purpose: Shift right a 27-bit integer by a 7-bit immediate value |
| Description: The 27-bit value in rB is right shifted by the 7-bit immediate value. The result is placed in rA. |
| Operation: rA ← rB >> IMM |
| Flags affected: Z C O S |
|
|
|
|
|
26 |
| 0111011 | rA | rB | Immediate | 00 | UF |
|
| Format: SRIM rA, rB, IMM |
| Purpose: Shift right a 54-bit integer by a 7-bit immediate value |
| Description: The 54-bit value in rB:rB+1 is right shifted by the 7-bit immediate value. The result is placed in rA:rA+1. |
| Operation: rA:rA+1 ← rB:rB+1 >> IMM |
| Flags affected: Z C O S |
|
| Format: SRM rA, rB, rC |
| Purpose: Shift right a 54-bit integer |
| Description: The 54-bit value in rB:rB+1 is right shifted the number of bits specified in rC. The result is placed in rA:rA+1. |
| Operation: rA:rA+1 ← rB:rB+1 >> rC |
| Flags affected: Z C O S |
|
|
|
|
|
|
|
| 1011000 | rA | rB | Register Count | Adjust rB | Memory Offset | 000 |
|
| Format: STSm rA, [rB + Offset, RegCount] |
| Purpose: Store a single byte into memory |
Description: The value in rB is added to Offset and a single byte per register is stored from the low 9 bits of each register from rA to rA+RegCount. m refers to the Adjust RB value which can have the following designations to indicate the mode:
| 0 | rB is not adjusted after store |
| I | 1 | rB has the number of bytes written added to the start value after all data is written |
| D | 2 | rB has the number of bytes to write subtracted from the start value after all data is written |
|
Operation:
StartReg = rA
RegCount = RegCount + 1
CurCount = RegCount
Temp = rB
if Mode is 2 then
Temp = Temp - CurCount
MemLocation = (Temp + Offset)
While CurCount is not 0
Memory[MemLocation] = Registers[StartReg] & 0x1ff
MemLocation += 1
StartReg = (StartReg + 1) % 32
CurCount = CurCount - 1
if Mode is 1 then
rB = rB + RegCount
if Mode is 2 then
rB = Temp |
| Flags affected: |
|
|
|
|
|
|
|
| 1011010 | rA | rB | Register Count | Adjust rB | Memory Offset | 000 |
|
| Format: STTm rA, [rB + Offset, RegCount] |
| Purpose: Store three bytes into memory |
Description: The value in rB is added to Offset and a three bytes per register are stored for each register from rA to rA+RegCount. m refers to the Adjust RB value which can have the following designations to indicate the mode:
| 0 | rB is not adjusted after store |
| I | 1 | rB has the number of bytes written added to the start value after all data is written |
| D | 2 | rB has the number of bytes to write subtracted from the start value after all data is written |
|
Operation:
StartReg = rA
RegCount = RegCount + 1
CurCount = RegCount
Temp = rB
if Mode is 2 then
Temp = Temp - (CurCount * 3)
MemLocation = (Temp + Offset)
While CurCount is not 0
Memory[MemLocation] =
(Registers[StartReg] >> 9) & 0x1ff
MemLocation += 1
Memory[MemLocation] =
(Registers[StartReg] >> 18) & 0x1ff
MemLocation += 1
Memory[MemLocation] =
Registers[StartReg] & 0x1ff
MemLocation += 1
StartReg = (StartReg + 1) % 32
CurCount = CurCount - 1
if Mode is 1 then
rB = rB + (RegCount * 3)
if Mode is 2 then
rB = Temp |
| Flags affected: |
|
|
|
|
|
|
|
| 1011001 | rA | rB | Register Count | Adjust rB | Memory Offset | 000 |
|
| Format: STWm rA, [rB + Offset, RegCount] |
| Purpose: Store two bytes into memory |
Description: The value in rB is added to Offset and a two bytes per register are stored from the low 18 bits of each register from rA to rA+RegCount. m refers to the Adjust RB value which can have the following designations to indicate the mode:
| 0 | rB is not adjusted after store |
| I | 1 | rB has the number of bytes written added to the start value after all data is written |
| D | 2 | rB has the number of bytes to write subtracted from the start value after all data is written |
|
Operation:
StartReg = rA
RegCount = RegCount + 1
CurCount = RegCount
Temp = rB
if Mode is 2 then
Temp = Temp - (CurCount * 2)
MemLocation = (Temp + Offset)
While CurCount is not 0
Memory[MemLocation] = (Registers[StartReg] >> 9) & 0x1ff
MemLocation = (MemLocation + 1)
Memory[MemLocation] = Registers[StartReg] & 0x1ff
MemLocation = (MemLocation + 1)
StartReg = (StartReg + 1) % 32
CurCount = CurCount - 1
if Mode is 1 then
rB = rB + (RegCount * 2)
if Mode is 2 then
rB = Temp |
| Flags affected: |
|
| Format: WT |
| Purpose: Wait for interrupt |
| Description: Pauses the processor until an interrupt fires. |
| Operation: |
| Flags affected: |
|
| Format: XR rA, rB, rC |
| Purpose: Bit-wise eXclusive OR two 27-bit integer registers together |
| Description: The 27-bit value in rC is bit-wise eXclusive OR to the 27-bit value in rB, the result is placed in rA. |
| Operation: rA ← rB ^ rC |
| Flags affected: Z C O S |
|
|
|
|
|
26 |
| 0011100 | rA | rB | Immediate | 01 | UF |
|
| Format: XRI rA, rB, IMM |
| Purpose: Bit-wise Exclusive OR a 27-bit integer register and 7-bit immediate together |
| Description: The 7-bit immediate value is bit-wise Exclusive OR to the 27-bit value in rB, the result is placed in rA. |
| Operation: rA ← rB ^ IMM |
| Flags affected: Z C O S |
|
| Format: XRM rA, rB, rC |
| Purpose: Bit-wise eXclusive OR two 54-bit integer registers together |
| Description: The 54-bit value in rC:rC+1 is bit-wise eXclusive OR to the 54-bit value in rB:rB+1, the result is placed in rA:rA+1. |
| Operation: rA:rA+1 ← rB:rB+1 ^ rC:rC+1 |
| Flags affected: Z C O S |
|
| Format: ZES rA, rB |
| Purpose: Zero extend from a byte |
| Description: Zero extend a single byte from register rB into the 27-bit rA. |
| Operation: rA ← rB & 0x00001FF |
| Flags affected: Z C O S |
|
| Format: ZEW rA, rB |
| Purpose: Zero extend from two bytes |
| Description: Zero extend a 18-bit value from register rB into the 27-bit rA. |
| Operation: rA ← rB & 0x003FFFF |
| Flags affected: Z C O S |
|